/*=============================================================================
*
*   Copyright (C) 2020 All rights reserved.
*
*   Filename:		registrator.hpp
*
*   Author: Wang Zhecheng - wangzhecheng@yeah.net
*
*   Date: 2020-03-04 14:38
*
*   Last Editors: Wang Zhecheng - wangzhecheng@yeah.net
*
*   Last modified:	2020-03-30 17:14
*
*   Description:
*
=============================================================================*/
#ifndef SHAPE_REGISTERS_H
#define SHAPE_REGISTERS_H

#include "../util/registrator.hpp"
#include "shapes.hpp"

namespace geoxfem {
namespace util {

template <typename DimensionType, typename degree>
struct registrator<geometry::ShapeInterface<DimensionType, degree>> {
  static void apply() {
    using shape      = geometry::ShapeInterface<DimensionType, degree>;
    using vertex     = geometry::Vertex<DimensionType, degree>;
    using segment    = geometry::Segment<DimensionType, degree>;
    using triangle   = geometry::Triangle<DimensionType, degree>;
    using quadrangle = geometry::Quadrangle<DimensionType, degree>;

    GEOXFEM_REGISTER_DERIVED(shape, vertex);
    GEOXFEM_REGISTER_DERIVED(shape, segment);
    GEOXFEM_REGISTER_DERIVED(shape, triangle);
    GEOXFEM_REGISTER_DERIVED(shape, quadrangle);
  }
};

}  // namespace util
}  // namespace geoxfem

#endif /* SHAPE_REGISTERS_H */
